package com.qin.mall.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 用户验证状态是否在指定范围内的注解
 * @author Leisure
 * create 2022 2022/10/11 21:49
 **/
//指定该注解是否会在 javadoc 体现
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.PARAMETER})
//代表处理逻辑是FlagValidatorClass 类
//自定义验证注解
@Constraint(validatedBy = FlagValidatorClass.class)
public @interface FlagValidator {
    //设置value数组默认为空
    String[] value() default {};
    //设置message 信息
    String message() default "flag is not found";
    //groups数组
    Class<?>[] groups() default {};
    //payload数组
    Class<? extends Payload>[] payload() default {};
    
}
